<template>
    <div>
        子组件::{{ title }}
    <nut-button type="primary" @click="handleClick">login api</nut-button>

    </div>
</template>

<script>
import { defineComponent, ref, reactive, nextTick, onMounted, toRaw, toRefs, watch } from 'vue'
export default defineComponent({
    props:{
        title:{
            type:String,
            default:()=>'xx'
        }
    },
    setup(props,{emit}) {
        const open = () =>{
            console.log('xxxxxx')
        }
        const handleClick =()=>{
            emit('succc','ok')
        }
        return {
            open,
            handleClick
        }
    }
})
</script>
<style scoped lang='scss'></style>